package com.diandian.backend.log.controller;

import com.diandian.backend.log.service.LogTaskProcessService;
import com.diandian.base.boot.starter.response.BaseResult;
import com.diandian.base.boot.starter.util.ResultUtil;
import com.diandian.backend.log.param.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * [日志]任务日志执行过程记录表
 */
@RestController
@RequestMapping("/log/task/process")
public class LogTaskProcessController{

    @Autowired
    private LogTaskProcessService iLogTaskProcessService;

    /**
    * 分页查询
    */
    @PostMapping("/page")
    public BaseResult page(@RequestBody LogTaskProcessPageParam param) {
        param.check();
        return ResultUtil.makeResult(iLogTaskProcessService.page(param.toDTO()));
    }

    /**
     * 7. 列表查询
     */
    @PostMapping("/list")
    public BaseResult list(@RequestBody LogTaskProcessListParam param) {
        param.check();
        return ResultUtil.makeResult(iLogTaskProcessService.getList(param.toDTO()));
    }

}